home *** CD-ROM | disk | FTP | other *** search
- // Copyright (c) 1999 Macromedia. All rights reserved.
-
- // Tell the user what is going to happen
- var message = confirm("This command creates a multi-frame animation by rotating and scaling the objects in the document.");
-
- if (message == true)
- {
- // Add frames for the animation
- var kNumFrames = 12;
-
- fw.getDocumentDOM().addFrames(kNumFrames, "after current");
- fw.getDocumentDOM().selectAll();
- fw.getDocumentDOM().duplicateSelectionToFrames("all");
-
- var angle = 30;
- var scale = 1 - 0.083;
- for (frameNum = 1; frameNum <= kNumFrames; frameNum++) {
- fw.getDocumentDOM().currentFrameNum = frameNum;
- fw.getDocumentDOM().selectAll();
- fw.getDocumentDOM().scaleSelection(scale, scale, "autoTrimImages transformAttributes");
- fw.getDocumentDOM().rotateSelection(angle, "autoTrimImages transformAttributes");
- scale -= 0.083;
- angle += 30;
- }
-
- // Set the export options
- fw.getDocumentDOM().setExportOptions({ exportFormat:"GIF animation" });
- }
-